﻿

using hcache;
using hdal;
using hentity;
using hhttp;
using hlog;
using hq;
using System;
using System.Collections.Generic;
using System.Web.Http;
 namespace htaskCommon {
    [RoutePrefix("Sys")]
    public class SysServer:BaseApiController {
        ICoreTaskServer server = WMSDalFactray.getDal<ICoreTaskServer>();
        //Sys/showLog
        [HttpGet,  Route("showLog")]
        public BaseResult showLog() {
            return BaseResult.Ok(LoggerCache.getAll());
        }
        //Sys/getStat
        [HttpGet,  Route("getStat")]
        public BaseResult getStat() {
            return BaseResult.Ok(TaskPool.getStat());
        }
         //Sys/getStat
        [HttpGet,  Route("login/{name}/{password}")]
        public BaseResult login(string name,string password) {
            return BaseResult.Ok(server.GetUser(name,password));
        }
        [HttpGet, Route("cache")]
        public BaseResult cache () {
            return BaseResult.Ok(MyCache.getAll());
        }
    }
   
}
